char r[1000],z[500],p;
main(a,b,c,d,e,f,g,t,h,i,w,n,m)
{
	for(;gets(r);puts(z))
	{
		for(a=b=c=d=e=f=g=t=h=i=w=0;p=r[i];i++)
		{
			n=p=='.';
			m=p=='-';

			if(a&m)
				z[w++]='A',t=h=m=n=0;
			if(b&n)
				z[w++]='B',t=h=m=n=0,++i;
			if(c&m)
				z[w++]='C',t=h=m=n=0,++i;
			if(d&n)
				z[w++]='D',t=h=m=n=0,++i;
			if(e&n&&r[i+1]=='.')
				z[w++]='E',t=h=m=n=0,i+=2;
			if(f&n&&r[i+1]=='-')
				z[w++]='F',t=h=m=n=0,i+=2;
			if(g&n)
				z[w++]='G',t=h=m=n=0,++i;

			a=t&m;
			b=h;
			c=h&m;
			d=t;
			e=h&m;
			f=h&m;
			g=t&m;

			t=r[i]=='.';
			h=r[i]=='-';
		}
	}
}
